From: Carlos Garnacho Date: Mon, 28 Jun 2021 16:06:47 +0000 (+0200) Subject: magnifier: Remove needless actor X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~574^2^2~246 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c449058d447c2588de81df2e2bd7a1ae98c4060f;p=gnome-shell.git magnifier: Remove needless actor For the pointer clone, we actually have 2 actors (one that contains the sprite, another that moves around). These can just be the same. Part-of: --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index c8f695e2b..2f0a279a2 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -99,15 +99,12 @@ var Magnifier = class Magnifier { this._mouseSprite = new Clutter.Actor({ request_mode: Clutter.RequestMode.CONTENT_SIZE }); this._mouseSprite.content = new MouseSpriteContent(); - this._cursorRoot = new Clutter.Actor(); - this._cursorRoot.add_actor(this._mouseSprite); - // Create the first ZoomRegion and initialize it according to the // magnification settings. [this.xMouse, this.yMouse] = global.get_pointer(); - let aZoomRegion = new ZoomRegion(this, this._cursorRoot); + let aZoomRegion = new ZoomRegion(this, this._mouseSprite); this._zoomRegions.push(aZoomRegion); this._settingsInit(aZoomRegion); aZoomRegion.scrollContentsTo(this.xMouse, this.yMouse); @@ -269,7 +266,7 @@ var Magnifier = class Magnifier { * @returns {ZoomRegion} the newly created ZoomRegion. */ createZoomRegion(xMagFactor, yMagFactor, roi, viewPort) { - let zoomRegion = new ZoomRegion(this, this._cursorRoot); + let zoomRegion = new ZoomRegion(this, this._mouseSprite); zoomRegion.setViewPort(viewPort); // We ignore the redundant width/height on the ROI